package com.zretc.service.Impl;


import com.zretc.domain.Account;
import com.zretc.mapper.AccountMapper1;
import com.zretc.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("accountService")
@Transactional
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper1 accountMapper1;

    public void save(Account account) {

        accountMapper1.save(account);
//        int i = 3 / 0;
    }

    public List<Account> findAll() {
        return accountMapper1.findAll();
    }
}
